import request from '@/js/request'

const BASE_URL = '/model/published/infos'

/**
 * 获取发布信息
 * @param currentPage
 * @param pageSize
 * @param condition 搜索条件
 * @returns {Promise<AxiosResponse<any>>}
 */
export function getPublishedInfo(currentPage, pageSize, condition) {
  return request.post(BASE_URL, condition, {params: {currentPage, pageSize}})
}

/**
 * 根据模型发布信息Id获取模型发布详细信息
 * @param id
 * @returns {Promise<AxiosResponse<T>>}
 */
export function getPublishedInfoDetail(id) {
  return request.get(BASE_URL, {params: {id}})
}
